home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / libiberty / Makefile.in < prev    next >
Makefile  |  1992-09-11  |  2KB  |  101 lines

  1. #
  2. # Makefile for libiberty directory
  3. #
  4.  
  5. #CC = gcc -b$(target) -g -nostdinc
  6. #CFLAGS= -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include
  7.  
  8. # Most hosts want strerror, but one or two don't, and they override these
  9. # definitions in the host-dependent makefile fragment.
  10. STRERROR_C = strerror.c
  11. STRERROR_O = strerror.o
  12.  
  13. # Host and target-dependent makefile fragments come in here.
  14. ####
  15. # End of host and target-dependent makefile fragments.
  16.  
  17. srcdir = .
  18. destdir = /usr/local
  19.  
  20. libdir = $(destdir)/H-$(host_alias)/T-independent/lib
  21.  
  22. CFILES = getopt.c getopt1.c obstack.c $(STRERROR_C) $(HOST_CFILES)
  23. OFILES = getopt.o getopt1.o obstack.o $(STRERROR_O) $(HOST_OFILES)
  24.  
  25. TARGETLIB = libiberty.a
  26. RANLIB = ranlib
  27. AR = ar
  28. AR_FLAGS = crv
  29. CFLAGS = -I$(srcdir)/../include $(HDEFINES)
  30.  
  31. STAGESTUFF = $(TARGETLIB) $(OFILES)
  32.  
  33. all:    $(TARGETLIB)
  34.  
  35. install: all
  36.     cp $(TARGETLIB) $(libdir)/$(TARGETLIB).new
  37.     $(RANLIB) $(libdir)/$(TARGETLIB).new
  38.     mv -f $(libdir)/$(TARGETLIB).new $(libdir)/$(TARGETLIB)
  39.  
  40. $(TARGETLIB): $(OFILES)
  41.     rm -rf $(TARGETLIB)
  42.     $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
  43.     $(RANLIB) $(TARGETLIB)
  44.  
  45. .PHONEY: all etags tags ls clean stage1 stage2
  46.  
  47. stage1: force
  48.     - mkdir stage1
  49.     - mv -f $(STAGESTUFF) stage1
  50.  
  51. stage2: force
  52.     - mkdir stage2
  53.     - mv -f $(STAGESTUFF) stage2
  54.  
  55. stage3: force
  56.     - mkdir stage3
  57.     - mv -f $(STAGESTUFF) stage3
  58.  
  59. stage4: force
  60.     - mkdir stage4
  61.     - mv -f $(STAGESTUFF) stage4
  62.  
  63. against=stage2
  64.  
  65. comparison: force
  66.     for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
  67.  
  68. de-stage1: force
  69.     - (cd stage1 ; mv -f * ..)
  70.     - rmdir stage1
  71.  
  72. de-stage2: force
  73.     - (cd stage2 ; mv -f * ..)
  74.     - rmdir stage2
  75.  
  76. de-stage3: force
  77.     - (cd stage3 ; mv -f * ..)
  78.     - rmdir stage3
  79.  
  80. de-stage4: force
  81.     - (cd stage4 ; mv -f * ..)
  82.     - rmdir stage4
  83.  
  84. etags tags: TAGS
  85.  
  86. TAGS: $(CFILES)
  87.     etags $(HFILES) $(CFILES)
  88.  
  89. ls:
  90.     @echo Makefile $(HFILES) $(CFILES)
  91.  
  92. # Need to deal with profiled libraries, too.
  93.  
  94. clean:
  95.     rm -f *.a *.o core errs *~ \#* TAGS *.E
  96.  
  97. force:
  98.  
  99. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  100.     $(SHELL) ./config.status
  101.